package com.linkhub.oms.admin.modules.logistic.freighttemplate.excel.listener;

import com.linkhub.oms.component.excel.listener.BaseDataListener;

import java.util.List;

/**
 * BaseFreightTemplateExcelDataListener
 *
 * @author Frank
 */
public abstract class BaseFreightTemplateExcelDataListener<T> extends BaseDataListener<T> {

    protected List<T> inValidDataList;

    public BaseFreightTemplateExcelDataListener(List<T> list) {
        super(list);
    }

    public List<T> acquireInValidList() {
        return inValidDataList;
    }

    @Override
    protected boolean checkEmptyField(T data) {
        boolean emptyData = super.checkEmptyField(data);
        if (emptyData) {
            inValidDataList.add(data);
        }
        return emptyData;
    }



}
